<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="utf-8">
  
  <title>第一周线性方程组与矩阵 | hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="高斯消元法N元线性方程组设m为方程数,n为变元数, 则n元方程组可表示为: （n &amp;gt; m）  m组\begin{cases} a_{11}x_1 + a_{12}x_{2} + \cdots\cdots + a_{1n}x_{n} &amp;= &amp;b_1 \\ a_{21}x_1  +a_{22}x_{2} +\cdots \cdots + a_{2n}x_{n} &amp; = &amp;b_2  \\ \vdo">
<meta name="keywords" content="线性方程组,增广矩阵,几何意义,初等行变换,矩阵的秩,rref">
<meta property="og:type" content="article">
<meta property="og:title" content="第一周线性方程组与矩阵">
<meta property="og:url" content="http://yoursite.com/2019/01/14/线性代数/实用大众线性代数/第1周线性方程组与矩阵/index.html">
<meta property="og:site_name" content="hexo">
<meta property="og:description" content="高斯消元法N元线性方程组设m为方程数,n为变元数, 则n元方程组可表示为: （n &amp;gt; m）  m组\begin{cases} a_{11}x_1 + a_{12}x_{2} + \cdots\cdots + a_{1n}x_{n} &amp;= &amp;b_1 \\ a_{21}x_1  +a_{22}x_{2} +\cdots \cdots + a_{2n}x_{n} &amp; = &amp;b_2  \\ \vdo">
<meta property="og:locale" content="default">
<meta property="og:updated_time" content="2019-06-24T10:14:52.643Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="第一周线性方程组与矩阵">
<meta name="twitter:description" content="高斯消元法N元线性方程组设m为方程数,n为变元数, 则n元方程组可表示为: （n &amp;gt; m）  m组\begin{cases} a_{11}x_1 + a_{12}x_{2} + \cdots\cdots + a_{1n}x_{n} &amp;= &amp;b_1 \\ a_{21}x_1  +a_{22}x_{2} +\cdots \cdots + a_{2n}x_{n} &amp; = &amp;b_2  \\ \vdo">
  
    <link rel="alternate" href="/atom.xml" title="hexo" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.ico">
  
  
    
  
  <link rel="stylesheet" href="/css/style.css">
  

</head>
</html>
<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    
    <div id="header-inner" class="inner">
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="搜索"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">首页</a>
        
          <a class="main-nav-link" href="/archives">归档</a>
        
          <a class="main-nav-link" href="/categories/高等数学">高等数学</a>
        
          <a class="main-nav-link" href="/categories/线性代数">线性代数</a>
        
          <a class="main-nav-link" href="/categories/数据结构与算法">数据结构与算法</a>
        
          <a class="main-nav-link" href="/categories/English">英语</a>
        
          <a class="main-nav-link" href="/about">关于</a>
        
      </nav>
      
    </div>
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">hexo</a>
      </h1>
      
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-线性代数/实用大众线性代数/第1周线性方程组与矩阵" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2019/01/14/线性代数/实用大众线性代数/第1周线性方程组与矩阵/" class="article-date">
  <time datetime="2019-01-14T10:02:08.000Z" itemprop="datePublished">2019-01-14</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/线性代数/">线性代数</a>►<a class="article-category-link" href="/categories/线性代数/实用大众线性代数/">实用大众线性代数</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      第一周线性方程组与矩阵
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <!-- Table of Contents -->
        
        <h1 id="高斯消元法"><a href="#高斯消元法" class="headerlink" title="高斯消元法"></a>高斯消元法</h1><h2 id="N元线性方程组"><a href="#N元线性方程组" class="headerlink" title="N元线性方程组"></a>N元线性方程组</h2><p>设m为方程数,n为变元数, 则n元方程组可表示为: （n &gt; m）</p>
<script type="math/tex; mode=display">
m组\begin{cases}
a_{11}x_1 + a_{12}x_{2} + \cdots\cdots + a_{1n}x_{n} &= &b_1 \\
a_{21}x_1  +a_{22}x_{2} +\cdots \cdots + a_{2n}x_{n} & = &b_2  \\
\vdots & \\
\vdots &  \\
\underbrace { a_{m1}x_1 + a_{m2}x_{2} +  \cdots\cdots  +  a_{mn}x_{n} = b_m }_{n个}\\
\end{cases} \tag{n元线性方程组}</script><h2 id="高斯消元法-1"><a href="#高斯消元法-1" class="headerlink" title="高斯消元法"></a>高斯消元法</h2><h3 id="消元过程"><a href="#消元过程" class="headerlink" title="消元过程"></a>消元过程</h3><p>通过 同解变换  转换为 阶梯形 同解方程组</p>
<h3 id="三种同解变换"><a href="#三种同解变换" class="headerlink" title="三种同解变换"></a>三种同解变换</h3><p>位置变换:  交换方程组位置</p>
<p>数乘变换:  方程左右两边 同乘 常数K</p>
<p>消元变换: 方程某元的K倍加到另一个方程上 消掉该元</p>
<h1 id="矩阵及矩阵的初等变换"><a href="#矩阵及矩阵的初等变换" class="headerlink" title="矩阵及矩阵的初等变换"></a>矩阵及矩阵的初等变换</h1><h2 id="矩阵的由来"><a href="#矩阵的由来" class="headerlink" title="矩阵的由来"></a>矩阵的由来</h2><p>提取方程组的系数 获得 系数数表  常数数表</p>
<script type="math/tex; mode=display">
A=\begin{bmatrix}
1&2&3\\
4&5&6\\
7&8&9\\
\end{bmatrix}
b=\begin{bmatrix}
1\\
4\\
7\\
\end{bmatrix}
\tag {方程组的系数矩阵和常数矩阵}</script><h2 id="矩阵的定义"><a href="#矩阵的定义" class="headerlink" title="矩阵的定义"></a>矩阵的定义</h2><p>由m x n个数 构成的m行n列的矩形数表</p>
<script type="math/tex; mode=display">
A=\begin{bmatrix}
a_{11}& a_{12} & \dots& a_{1n}\\
a_{21}& a_{22} & \dots& a_{2n}\\
\vdots& \vdots & \ddots&\vdots\\
a_{m1}& a_{m2} & \dots& a_{mn} \\
\end{bmatrix}
\tag {m x n阶矩阵}</script><h2 id="特殊矩阵"><a href="#特殊矩阵" class="headerlink" title="特殊矩阵"></a>特殊矩阵</h2><h3 id="行矩阵"><a href="#行矩阵" class="headerlink" title="行矩阵 :"></a>行矩阵 :</h3><script type="math/tex; mode=display">
A=\begin{bmatrix}
a_1&a_2&... & a_n\\
\end{bmatrix}</script><h3 id="列矩阵"><a href="#列矩阵" class="headerlink" title="列矩阵"></a>列矩阵</h3><script type="math/tex; mode=display">
A=\begin{bmatrix}
a_1 \\

a_2 \\
\vdots \\
a_n \\

\end{bmatrix}</script><h3 id="同形矩阵"><a href="#同形矩阵" class="headerlink" title="同形矩阵"></a>同形矩阵</h3><p>行数 列数相等</p>
<h3 id="零矩阵"><a href="#零矩阵" class="headerlink" title="零矩阵"></a>零矩阵</h3><h3 id="n阶方阵"><a href="#n阶方阵" class="headerlink" title="n阶方阵"></a>n阶方阵</h3><script type="math/tex; mode=display">
A=\begin{bmatrix}
a_{11}& a_{12} & \dots& a_{1n}\\
a_{21}& a_{22} & \dots& a_{2n}\\
\vdots& \vdots & \ddots&\vdots\\
a_{n1}& a_{m2} & \dots& a_{nn} \\
\end{bmatrix}
\tag {n阶矩阵}</script><h2 id="特殊矩阵-1"><a href="#特殊矩阵-1" class="headerlink" title="特殊矩阵"></a>特殊矩阵</h2><h3 id="上三角矩阵"><a href="#上三角矩阵" class="headerlink" title="上三角矩阵:"></a>上三角矩阵:</h3><script type="math/tex; mode=display">
A=\begin{bmatrix}
a_{11}& a_{12} & \dots& a_{1n}\\
0 & a_{22} & \dots& a_{2n}\\
\vdots& \vdots & \ddots&\vdots\\
0& 0 & \dots& a_{nn} \\
\end{bmatrix}
\tag {n阶矩阵}</script><h3 id="下三角矩阵"><a href="#下三角矩阵" class="headerlink" title="下三角矩阵:"></a>下三角矩阵:</h3><script type="math/tex; mode=display">
A=\begin{bmatrix}
a_{11}& 0 & \dots& 0\\
a_{21}& a_{22} & \dots& 0\\
\vdots& \vdots & \ddots&\vdots\\
a_{n1}& a_{n2} & \dots& a_{nn} \\
\end{bmatrix}
\tag {n阶矩阵}</script><h3 id="对角矩阵-A-n"><a href="#对角矩阵-A-n" class="headerlink" title="对角矩阵 $ A_n $"></a>对角矩阵 $ A_n $</h3><p>除对角线外全为0</p>
<script type="math/tex; mode=display">
A=\begin{bmatrix}
a_{11}& 0 & \dots& 0\\
0 & a_{22} & \dots& 0\\
\vdots& \vdots & \ddots&\vdots\\
0 & 0 & \dots& a_{nn} \\
\end{bmatrix}
\tag {n阶矩阵}</script><h3 id="单位矩阵-I-n"><a href="#单位矩阵-I-n" class="headerlink" title="单位矩阵 $ I_n $"></a>单位矩阵 $ I_n $</h3><p>对角线全为1的对角阵N阶对角方阵</p>
<script type="math/tex; mode=display">
I =\begin{bmatrix}
1 & 0 & \dots& 0\\
0 & 1 & \dots& 0\\
\vdots& \vdots & \ddots&\vdots\\
0& 0 & \dots& 1 \\
\end{bmatrix}
\tag {n阶方阵}</script><h2 id="增广炬阵"><a href="#增广炬阵" class="headerlink" title="增广炬阵"></a>增广炬阵</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">线性方程组可以用增光矩阵表示</span><br></pre></td></tr></table></figure>
<p>系数矩阵$ A_n $, 常数项矩阵 b 并列组成的矩阵 C</p>
<p>C = [A, b]</p>
<h2 id="矩阵的初等行变换"><a href="#矩阵的初等行变换" class="headerlink" title="矩阵的初等行变换"></a>矩阵的初等行变换</h2><h2 id="方法"><a href="#方法" class="headerlink" title="方法"></a>方法</h2><ol>
<li>交换两行的位置</li>
<li>某行乘以常数K</li>
<li>把某一行的K倍加到另一行</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">初等行变换是可逆的  称为 同解变换</span><br></pre></td></tr></table></figure>
<h2 id="两矩阵等价"><a href="#两矩阵等价" class="headerlink" title="两矩阵等价"></a>两矩阵等价</h2><p>A 初等行变换 变为B  : A B 等价</p>
<h1 id="利用MATLAB解方程组"><a href="#利用MATLAB解方程组" class="headerlink" title="利用MATLAB解方程组"></a>利用MATLAB解方程组</h1><h2 id="行最简型"><a href="#行最简型" class="headerlink" title="行最简型"></a>行最简型</h2><p>Reduced Row Echelon Form</p>
<p>把矩阵化为行最简形</p>
<p>行阶梯矩阵：逐行形成阶梯  </p>
<figure class="highlight matlab"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">ans</span> =</span><br><span class="line">   <span class="number">9</span>    <span class="number">6</span>    <span class="number">2</span>   <span class="number">4</span></span><br><span class="line">   <span class="number">0</span>    <span class="number">3</span>    <span class="number">8</span>   <span class="number">7</span></span><br><span class="line">   <span class="number">0</span>    <span class="number">0</span>    <span class="number">5</span>   <span class="number">1</span></span><br><span class="line">   <span class="number">0</span>   	<span class="number">0</span>    <span class="number">0</span>   <span class="number">7</span></span><br><span class="line">   <span class="number">0</span>   	<span class="number">0</span>    <span class="number">0</span>   <span class="number">0</span></span><br></pre></td></tr></table></figure>
<p>行最简型<br>首个不为0的值为1</p>
<p>秩 4</p>
<figure class="highlight matlab"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="number">1</span>    <span class="number">6</span>    <span class="number">2</span>   <span class="number">4</span></span><br><span class="line"><span class="number">0</span>    <span class="number">1</span>    <span class="number">0</span>   <span class="number">7</span></span><br><span class="line"><span class="number">0</span>    <span class="number">0</span>    <span class="number">1</span>   <span class="number">7</span></span><br><span class="line"><span class="number">0</span>   	<span class="number">0</span>    <span class="number">0</span>   <span class="number">1</span></span><br><span class="line"><span class="number">0</span>   	<span class="number">0</span>    <span class="number">0</span>   <span class="number">0</span></span><br></pre></td></tr></table></figure>
<p>秩 3</p>
<figure class="highlight matlab"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="number">1</span>    <span class="number">6</span>    <span class="number">2</span>   <span class="number">4</span></span><br><span class="line"><span class="number">0</span>    <span class="number">1</span>    <span class="number">0</span>   <span class="number">7</span></span><br><span class="line"><span class="number">0</span>    <span class="number">0</span>    <span class="number">1</span>   <span class="number">7</span></span><br></pre></td></tr></table></figure>
<h2 id="rref-函数"><a href="#rref-函数" class="headerlink" title="rref 函数"></a>rref 函数</h2><ol>
<li>解线性方程</li>
<li>矩阵的秩  (几行非0)   有几个真正的约束条件</li>
<li>行最简形首元所在的列数</li>
</ol>
<p>行阶梯矩阵——&gt; 行最简形</p>
<p>例 1</p>
<script type="math/tex; mode=display">
A= \begin{bmatrix}
 2 & -2 & 2 & 6 \\
 2 & -1 & 2 & 4 \\
3 & -1 & 4 & 4 \\
1 & 1 & -1 & 3
\end{bmatrix}   
b = \begin{bmatrix}
-16 \\
-10 \\
-11 \\
-12
\end{bmatrix}</script><p>解：</p>
<p>ans = rref([A, b])</p>
<figure class="highlight matlab"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">&gt;&gt; A=[<span class="number">2</span> <span class="number">-2</span> <span class="number">2</span> <span class="number">6</span>; <span class="number">2</span> <span class="number">-1</span> <span class="number">2</span> <span class="number">4</span>; <span class="number">3</span> <span class="number">-1</span> <span class="number">4</span> <span class="number">4</span>; <span class="number">1</span> <span class="number">1</span> <span class="number">-1</span> <span class="number">3</span>]</span><br><span class="line">A =</span><br><span class="line">     <span class="number">2</span>    <span class="number">-2</span>     <span class="number">2</span>     <span class="number">6</span></span><br><span class="line">     <span class="number">2</span>    <span class="number">-1</span>     <span class="number">2</span>     <span class="number">4</span></span><br><span class="line">     <span class="number">3</span>    <span class="number">-1</span>     <span class="number">4</span>     <span class="number">4</span></span><br><span class="line">     <span class="number">1</span>     <span class="number">1</span>    <span class="number">-1</span>     <span class="number">3</span></span><br><span class="line">&gt;&gt; b=[<span class="number">-16</span>; <span class="number">-10</span> ; <span class="number">-11</span>; <span class="number">-12</span>]</span><br><span class="line">b =</span><br><span class="line">   <span class="number">-16</span></span><br><span class="line">   <span class="number">-10</span></span><br><span class="line">   <span class="number">-11</span></span><br><span class="line">   <span class="number">-12</span></span><br><span class="line">&gt;&gt; rref([A,b])</span><br><span class="line"><span class="built_in">ans</span> =</span><br><span class="line">     <span class="number">1</span>     <span class="number">0</span>     <span class="number">0</span>     <span class="number">0</span>    <span class="number">11</span></span><br><span class="line">     <span class="number">0</span>     <span class="number">1</span>     <span class="number">0</span>     <span class="number">0</span>    <span class="number">-8</span></span><br><span class="line">     <span class="number">0</span>     <span class="number">0</span>     <span class="number">1</span>     <span class="number">0</span>    <span class="number">-6</span></span><br><span class="line">     <span class="number">0</span>     <span class="number">0</span>     <span class="number">0</span>     <span class="number">1</span>    <span class="number">-7</span></span><br></pre></td></tr></table></figure>
<p>最后一列就是方程的解</p>
<p>例 2</p>
<p>判断解的性质和A的秩</p>
<figure class="highlight matlab"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">&gt;&gt; A=[<span class="number">-2</span> <span class="number">-2</span>  <span class="number">2</span> <span class="number">2</span> <span class="number">-2</span>; <span class="number">1</span> <span class="number">-5</span> <span class="number">1</span> <span class="number">-3</span> <span class="number">-1</span>; <span class="number">-1</span> <span class="number">2</span> <span class="number">-5</span> <span class="number">6</span> <span class="number">5</span>; <span class="number">-1</span> <span class="number">2</span> <span class="number">1</span> <span class="number">0</span> <span class="number">-1</span>]</span><br><span class="line">A =</span><br><span class="line">    <span class="number">-2</span>    <span class="number">-2</span>     <span class="number">2</span>     <span class="number">2</span>    <span class="number">-2</span></span><br><span class="line">     <span class="number">1</span>    <span class="number">-5</span>     <span class="number">1</span>    <span class="number">-3</span>    <span class="number">-1</span></span><br><span class="line">    <span class="number">-1</span>     <span class="number">2</span>    <span class="number">-5</span>     <span class="number">6</span>     <span class="number">5</span></span><br><span class="line">    <span class="number">-1</span>     <span class="number">2</span>     <span class="number">1</span>     <span class="number">0</span>    <span class="number">-1</span></span><br><span class="line">&gt;&gt; b = [<span class="number">-2</span>; <span class="number">-1</span>; <span class="number">2</span> ; <span class="number">0</span>]</span><br><span class="line">b =</span><br><span class="line">    <span class="number">-2</span></span><br><span class="line">    <span class="number">-1</span></span><br><span class="line">     <span class="number">2</span></span><br><span class="line">     <span class="number">0</span></span><br><span class="line">&gt;&gt; rref([A,b])</span><br><span class="line"><span class="built_in">ans</span> =</span><br><span class="line">    <span class="number">1.0000</span>         <span class="number">0</span>         <span class="number">0</span>         <span class="number">0</span>         <span class="number">0</span>   <span class="number">-0.2222</span></span><br><span class="line">         <span class="number">0</span>    <span class="number">1.0000</span>         <span class="number">0</span>         <span class="number">0</span>         <span class="number">0</span>    <span class="number">0.2222</span></span><br><span class="line">         <span class="number">0</span>         <span class="number">0</span>    <span class="number">1.0000</span>         <span class="number">0</span>   <span class="number">-1.0000</span>   <span class="number">-0.6667</span></span><br><span class="line">         <span class="number">0</span>         <span class="number">0</span>         <span class="number">0</span>    <span class="number">1.0000</span>         <span class="number">0</span>   <span class="number">-0.3333</span></span><br></pre></td></tr></table></figure>
<p>故欠定 有无穷解  秩为4</p>
<p>ip = 1 2 3 4   不为0的首元</p>
<h1 id="应用实例"><a href="#应用实例" class="headerlink" title="应用实例"></a>应用实例</h1><h1 id=""><a href="#" class="headerlink" title="#"></a>#</h1><h2 id="平板材料温度问题"><a href="#平板材料温度问题" class="headerlink" title="平板材料温度问题"></a>平板材料温度问题</h2><figure class="highlight matlab"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">&gt;&gt; A = [<span class="number">1</span> <span class="number">0</span> <span class="number">0</span> <span class="number">0</span>; <span class="number">1</span> <span class="number">1</span> <span class="number">1</span> <span class="number">1</span>; <span class="number">1</span> <span class="number">2</span> <span class="number">4</span> <span class="number">8</span>; <span class="number">1</span> <span class="number">3</span> <span class="number">9</span> <span class="number">27</span>]</span><br><span class="line">A =</span><br><span class="line">     <span class="number">1</span>     <span class="number">0</span>     <span class="number">0</span>     <span class="number">0</span></span><br><span class="line">     <span class="number">1</span>     <span class="number">1</span>     <span class="number">1</span>     <span class="number">1</span></span><br><span class="line">     <span class="number">1</span>     <span class="number">2</span>     <span class="number">4</span>     <span class="number">8</span></span><br><span class="line">     <span class="number">1</span>     <span class="number">3</span>     <span class="number">9</span>    <span class="number">27</span></span><br><span class="line">&gt;&gt; b = [<span class="number">3</span> ; <span class="number">0</span>; <span class="number">-1</span>; <span class="number">6</span>]</span><br><span class="line">b =</span><br><span class="line">     <span class="number">3</span></span><br><span class="line">     <span class="number">0</span></span><br><span class="line">    <span class="number">-1</span></span><br><span class="line">     <span class="number">6</span></span><br><span class="line">&gt;&gt; rref([A,b])</span><br><span class="line"><span class="built_in">ans</span> =</span><br><span class="line">     <span class="number">1</span>     <span class="number">0</span>     <span class="number">0</span>     <span class="number">0</span>     <span class="number">3</span></span><br><span class="line">     <span class="number">0</span>     <span class="number">1</span>     <span class="number">0</span>     <span class="number">0</span>    <span class="number">-2</span></span><br><span class="line">     <span class="number">0</span>     <span class="number">0</span>     <span class="number">1</span>     <span class="number">0</span>    <span class="number">-2</span></span><br><span class="line">     <span class="number">0</span>     <span class="number">0</span>     <span class="number">0</span>     <span class="number">1</span>     <span class="number">1</span></span><br></pre></td></tr></table></figure>
<h2 id="交通节点车流量问题"><a href="#交通节点车流量问题" class="headerlink" title="交通节点车流量问题"></a>交通节点车流量问题</h2><h2 id="化学式配平问题"><a href="#化学式配平问题" class="headerlink" title="化学式配平问题"></a>化学式配平问题</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">&gt;&gt; A = [3 0 -1 0; 8 0 0 -2; 0 2 -2 -1]</span><br><span class="line">A =</span><br><span class="line">       3              0             -1              0       </span><br><span class="line">       8              0              0             -2       </span><br><span class="line">       0              2             -2             -1       </span><br><span class="line">&gt;&gt; b = [0; 0; 0]</span><br><span class="line">b =</span><br><span class="line">       0       </span><br><span class="line">       0       </span><br><span class="line">       0       </span><br><span class="line">&gt;&gt; format rat, rref([A,b])</span><br><span class="line">ans =</span><br><span class="line">       1              0              0             -1/4            0       </span><br><span class="line">       0              1              0             -5/4            0       </span><br><span class="line">       0              0              1             -3/4            0</span><br></pre></td></tr></table></figure>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">1. 了解二，三阶线性方程组的图形和几何意义</span><br><span class="line">2. 利用初等变换把 增广矩阵 转化为 行最简形</span><br><span class="line">3. 秩表明独立方程的个数</span><br><span class="line">4. 系数矩阵和增广矩阵的秩相等是线性方程组有解的充分必要条件</span><br></pre></td></tr></table></figure>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2019/01/14/线性代数/实用大众线性代数/第1周线性方程组与矩阵/" data-id="cjz7utmp00021xhpeg0wao1wp" class="article-share-link">分享</a>
      
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/rref/">rref</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/几何意义/">几何意义</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/初等行变换/">初等行变换</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/增广矩阵/">增广矩阵</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/矩阵的秩/">矩阵的秩</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/线性方程组/">线性方程组</a></li></ul>

    </footer>
  </div>
  
    
    
<nav id="article-nav">
  
    <a href="/2019/01/16/线性代数/实用大众线性代数/第2周用MATLAB解线性方程组/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">上一篇</strong>
      <div class="article-nav-title">
        
          第二周用MATLAB解线性方程组
        
      </div>
    </a>
  
  
</nav>

  
</article>
 
     
  

</section>
           
    <aside id="sidebar">
  
    

  
    
    <div class="widget-wrap">
    
      <div class="widget" id="toc-widget-fixed">
      
        <strong class="toc-title">文章目录</strong>
        <div class="toc-widget-list">
              <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#高斯消元法"><span class="toc-number">1.</span> <span class="toc-text">高斯消元法</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#N元线性方程组"><span class="toc-number">1.1.</span> <span class="toc-text">N元线性方程组</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#高斯消元法-1"><span class="toc-number">1.2.</span> <span class="toc-text">高斯消元法</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#消元过程"><span class="toc-number">1.2.1.</span> <span class="toc-text">消元过程</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#三种同解变换"><span class="toc-number">1.2.2.</span> <span class="toc-text">三种同解变换</span></a></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#矩阵及矩阵的初等变换"><span class="toc-number">2.</span> <span class="toc-text">矩阵及矩阵的初等变换</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#矩阵的由来"><span class="toc-number">2.1.</span> <span class="toc-text">矩阵的由来</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#矩阵的定义"><span class="toc-number">2.2.</span> <span class="toc-text">矩阵的定义</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#特殊矩阵"><span class="toc-number">2.3.</span> <span class="toc-text">特殊矩阵</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#行矩阵"><span class="toc-number">2.3.1.</span> <span class="toc-text">行矩阵 :</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#列矩阵"><span class="toc-number">2.3.2.</span> <span class="toc-text">列矩阵</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#同形矩阵"><span class="toc-number">2.3.3.</span> <span class="toc-text">同形矩阵</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#零矩阵"><span class="toc-number">2.3.4.</span> <span class="toc-text">零矩阵</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#n阶方阵"><span class="toc-number">2.3.5.</span> <span class="toc-text">n阶方阵</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#特殊矩阵-1"><span class="toc-number">2.4.</span> <span class="toc-text">特殊矩阵</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#上三角矩阵"><span class="toc-number">2.4.1.</span> <span class="toc-text">上三角矩阵:</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#下三角矩阵"><span class="toc-number">2.4.2.</span> <span class="toc-text">下三角矩阵:</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#对角矩阵-A-n"><span class="toc-number">2.4.3.</span> <span class="toc-text">对角矩阵 $ A_n $</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#单位矩阵-I-n"><span class="toc-number">2.4.4.</span> <span class="toc-text">单位矩阵 $ I_n $</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#增广炬阵"><span class="toc-number">2.5.</span> <span class="toc-text">增广炬阵</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#矩阵的初等行变换"><span class="toc-number">2.6.</span> <span class="toc-text">矩阵的初等行变换</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#方法"><span class="toc-number">2.7.</span> <span class="toc-text">方法</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#两矩阵等价"><span class="toc-number">2.8.</span> <span class="toc-text">两矩阵等价</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#利用MATLAB解方程组"><span class="toc-number">3.</span> <span class="toc-text">利用MATLAB解方程组</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#行最简型"><span class="toc-number">3.1.</span> <span class="toc-text">行最简型</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#rref-函数"><span class="toc-number">3.2.</span> <span class="toc-text">rref 函数</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#应用实例"><span class="toc-number">4.</span> <span class="toc-text">应用实例</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#null"><span class="toc-number">5.</span> <span class="toc-text">#</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#平板材料温度问题"><span class="toc-number">5.1.</span> <span class="toc-text">平板材料温度问题</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#交通节点车流量问题"><span class="toc-number">5.2.</span> <span class="toc-text">交通节点车流量问题</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#化学式配平问题"><span class="toc-number">5.3.</span> <span class="toc-text">化学式配平问题</span></a></li></ol></li></ol>
          </div>
      </div>
    </div>

  
    

  
    
  
    
  
    

  
    
  
    <!--微信公众号二维码-->


  
</aside>

      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-left">
      &copy; 2014 - 2019 tiger&nbsp;|&nbsp;
      主题 <a href="https://github.com/giscafer/hexo-theme-cafe/" target="_blank">Cafe</a>
    </div>
     <div id="footer-right">
      联系方式&nbsp;|&nbsp;375478250@qq.com
    </div>
  </div>
</footer>
 <script src="/jquery/jquery.min.js"></script>

 <script src='https://unpkg.com/mermaid@8.1.0/dist/mermaid.min.js'></script>
 <script>
 if (window.mermaid) {
	 mermaid.initialize({startOnLoad:true});
 }
</script>

    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">首页</a>
  
    <a href="/archives" class="mobile-nav-link">归档</a>
  
    <a href="/categories/高等数学" class="mobile-nav-link">高等数学</a>
  
    <a href="/categories/线性代数" class="mobile-nav-link">线性代数</a>
  
    <a href="/categories/数据结构与算法" class="mobile-nav-link">数据结构与算法</a>
  
    <a href="/categories/English" class="mobile-nav-link">英语</a>
  
    <a href="/about" class="mobile-nav-link">关于</a>
  
</nav>
    <img class="back-to-top-btn" src="/images/fly-to-top.png"/>
<script>
// Elevator script included on the page, already.
window.onload = function() {
  var elevator = new Elevator({
    selector:'.back-to-top-btn',
    element: document.querySelector('.back-to-top-btn'),
    duration: 1000 // milliseconds
  });
}
</script>
    <!-- author:forvoid begin -->
<!-- author:forvoid end -->


  
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      })
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      })
    </script>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML"></script>
  


 <script src="/js/is.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>
<script src="/js/elevator.js"></script>
  </div>
</body>
</html>
